<?php
require_once 'DB.php';
require_once 'Response.php';


$icon=$_REQUEST['icon'];
$id=$_REQUEST['id'];

$pdo = DB::getInstance()->connect();


$sql="UPDATE user SET icon='$icon' Where id = $id";
//$sql1="UPDATE user SET icon='$icon' Where username ='$username'  ";
$stmt=$pdo->query($sql);
Response::json('200', '头像添加成功', $data);
